package com.ruoyi.back.controller

import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.AppInfo
import com.ruoyi.back.service.AppInfoService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiImplicitParam
import io.swagger.annotations.ApiImplicitParams
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/system/appInfo")
@Api(tags = ["关于我们-用户协议&隐私政策"])
class AppInfoController {

    @Autowired
    private lateinit var appInfoService: AppInfoService


    @ApiOperation("获取用户协议&隐私政策的相关信息")
    @GetMapping("getAppInfo")
    fun getAppInfo(appInfoSearchDto: AppInfoService.AppInfoSearchDto): Data<AppInfo> = appInfoService.getAppInfo(appInfoSearchDto)

    @ApiOperation("保存用户协议&隐私政策的相关信息")
    @PostMapping("save")
    fun saveAppInfo(@RequestBody appInfo: AppInfo): Data<Boolean> = appInfoService.saveAppInfo(appInfo)
}